﻿using ProtoBuf;
namespace PnJ.Aliyun.OTS.Models
{
    /// <summary>
    /// 定义一列，只用于主键列
    /// </summary>
    [ProtoContract(Name = "ColumnSchema")]
    public class ColumnSchema
    {

        public ColumnSchema()
        {

        }
        public ColumnSchema(string name, ColumnType type)
        {
            this.Name = name;
            this.Type = type;
        }
        /// <summary>
        /// 该列的列名
        /// </summary>
        [ProtoMember(1, Name = "name", IsRequired = true)]
        public string Name
        {
            get; set;

        }
        /// <summary>
        /// 该列的数据类型
        /// </summary>
        [ProtoMember(2, Name = "type", IsRequired = true)]
        public ColumnType Type
        {
            get; set;
        }
    }
}
